using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ParcelTools._Administration
{
    /// <summary>
    /// <para>Create Parcel Records</para>
    /// <para>Creates parcel records for the input parcel fabric features  using a record name field or an expression.</para>
    /// <para>使用记录名称字段或表达式为输入宗地结构要素创建宗地记录。</para>
    /// </summary>    
    [DisplayName("Create Parcel Records")]
    public class CreateParcelRecords : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateParcelRecords()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_parcel_features">
        /// <para>Parcel Features</para>
        /// <para>The input parcel features that will be used to create parcel records. The input parcel features can be from a parcel fabric in a file geodatabase or an enterprise geodatabase.</para>
        /// <para>将用于创建宗地记录的输入宗地要素。输入宗地要素可以来自文件地理数据库或企业级地理数据库中的宗地结构。</para>
        /// </param>
        public CreateParcelRecords(object _in_parcel_features)
        {
            this._in_parcel_features = _in_parcel_features;
        }
        public override string ToolboxName => "Parcel Tools";

        public override string ToolName => "Create Parcel Records";

        public override string CallName => "parcel.CreateParcelRecords";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_parcel_features, _record_field, _out_record_feature_class, _updated_parcel_fabric, _record_expression, _record_name_method.GetGPValue()];

        /// <summary>
        /// <para>Parcel Features</para>
        /// <para>The input parcel features that will be used to create parcel records. The input parcel features can be from a parcel fabric in a file geodatabase or an enterprise geodatabase.</para>
        /// <para>将用于创建宗地记录的输入宗地要素。输入宗地要素可以来自文件地理数据库或企业级地理数据库中的宗地结构。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Parcel Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_parcel_features { get; set; }


        /// <summary>
        /// <para>Record Field</para>
        /// <para>The attribute field that contains the record names. The attribute field must be a text field and must contain parcel record names that correspond to their associated parcel features.</para>
        /// <para>包含记录名称的属性字段。属性字段必须为文本字段，并且必须包含与其关联宗地要素相对应的宗地记录名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Record Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _record_field { get; set; } = null;


        /// <summary>
        /// <para>Output Records Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Records Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_record_feature_class { get; set; }


        /// <summary>
        /// <para>Updated Parcel Fabric</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Parcel Fabric")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_parcel_fabric { get; set; }


        /// <summary>
        /// <para>Record Expression</para>
        /// <para>An Arcade expression that uses fields, string operators, and mathematical operators to represent the record names. For example, the expression Left($feature.Name,4) extracts the first four characters from the parcel name field in the parcel fabric polygon feature class to create the record names.</para>
        /// <para>一个 Arcade 表达式，它使用字段、字符串运算符和数学运算符来表示记录名称。例如，表达式 Left（$feature.Name，4） 从宗地结构面要素类的宗地名称字段中提取前四个字符以创建记录名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Record Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _record_expression { get; set; } = null;


        /// <summary>
        /// <para>Record Name Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the method to use to create parcel records.</para>
        ///   <bulletList>
        ///     <bullet_item>Field—Parcel records will be created using record names from a text field on the input parcel features. This is the default.</bullet_item><para/>
        ///     <bullet_item>Expression—Parcel records will be created using an Arcade expression.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于创建宗地记录的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>字段 - 将使用输入宗地要素上文本字段中的记录名称创建宗地记录。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>表达式 - 将使用 Arcade 表达式创建宗地记录。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Record Name Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _record_name_method_value _record_name_method { get; set; } = _record_name_method_value._FIELD;

        public enum _record_name_method_value
        {
            /// <summary>
            /// <para>Field</para>
            /// <para>Field—Parcel records will be created using record names from a text field on the input parcel features. This is the default.</para>
            /// <para>字段 - 将使用输入宗地要素上文本字段中的记录名称创建宗地记录。这是默认设置。</para>
            /// </summary>
            [Description("Field")]
            [GPEnumValue("FIELD")]
            _FIELD,

            /// <summary>
            /// <para>Expression</para>
            /// <para>Expression—Parcel records will be created using an Arcade expression.</para>
            /// <para>表达式 - 将使用 Arcade 表达式创建宗地记录。</para>
            /// </summary>
            [Description("Expression")]
            [GPEnumValue("EXPRESSION")]
            _EXPRESSION,

        }

        public CreateParcelRecords SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}